package com.wanmait.wanmarecruit.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wanmait.wanmarecruit.entity.PositionHistory;
import com.wanmait.wanmarecruit.mapper.PositionHistoryMapper;
import com.wanmait.wanmarecruit.service.PositionHistoryService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Function;
@Service
@Transactional(rollbackFor = Exception.class)
public class PositionHistoryServiceImpl extends ServiceImpl<PositionHistoryMapper,PositionHistory> implements PositionHistoryService {

    @Resource
    private PositionHistoryMapper positionHistoryMapper;
    @Override
    public List<PositionHistory> getPositionHistoryByUserId(Integer userId) {
        return positionHistoryMapper.selectPositionHistoryByUserId(userId);
    }

    @Override
    public void insertPositionHistoryWithUserIdAndPositionId(PositionHistory positionHistory) {

        this.save(positionHistory);
    }
}
